cmake_minimum_required(VERSION 3.8)
project(set_normal_var)

#set(myvar "This is my variable")
#set(myvar "one" "two" "three")
#set(myvar)

#message(STATUS "myvar = ${myvar}")

function(myfunc1)
	set(myvar1 "myvar1 in myfunc1")
	set(myvar2 "myvar2 in myfunc1 with PARENT_SCOPE" PARENT_SCOPE)
endfunction()
#myfunc1()

function(myfunc2)
	myfunc1()
	message(STATUS "myvar1 - myfunc2 = ${myvar1}")
	message(STATUS "myvar2 - myfunc2 = ${myvar2}")
endfunction()
myfunc2()

message(STATUS "myvar1 = ${myvar1}")
message(STATUS "myvar2 = ${myvar2}")
